package com.haohope.excel.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import com.haohope.excel.enums.ExcelHeadCol;
import com.haohope.excel.rules.IExcelRule;
import com.haohope.excel.rules.NoneRule;
import com.haohope.excel.trans.IExcelTrans;
import com.haohope.excel.trans.NoneTrans;
import com.haohope.excel.types.NoneType;

@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ExcelProperty {
	public boolean required() default false;
	public String requiredMsg() default "";
	/**
	 * 正则表达式
	 * @return
	 */
	public String regexp()  default "";
	/**
	 * 正则表达式错误信息
	 * @return
	 */
	public String regexpMsg() default "";
	/**
	 * 获取sheetname
	 * @return
	 */
	public boolean sheetnameflag() default false;
	public boolean sheetindexflag() default false;
	public boolean rowindexflag() default false;
	/**
	 * 表头列
	 * @return
	 */
    public ExcelHeadCol headCol() default ExcelHeadCol.NULL;
    /**
             * 行
     * @return
     */
    public int row() default 0;
    /**
             * 列
     * @return
     */
    public ExcelHeadCol col() default ExcelHeadCol.A;
    @SuppressWarnings("rawtypes")
	public Class type() default NoneType.class ;
    public String defaultValue() default "";
    public String dateformat() default "yyyy-MM-dd HH:mm:ss";
	@SuppressWarnings("rawtypes")
	public Class<? extends IExcelRule> rule() default NoneRule.class;
	@SuppressWarnings("rawtypes")
	public Class<? extends IExcelTrans> trans() default NoneTrans.class;
}

	